package com.epoch.servicecourse.dao;

import com.epoch.servicecourse.bean.Chapter;
import com.epoch.servicecourse.bean.Point;
import com.epoch.servicecourse.bean.Vocabulary;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author mi
 */
@Mapper
@Repository
public interface ChapterDao {
    /**
     * 返回章节
     * @param courseId
     * @return List<Chapter>
     */
    List<Chapter> getChapterBy(String courseId);

    List<Point> getPointBy(String courseId,String chapterId);
    List<Vocabulary> getVocabularyBy(Integer pointId);
    /**
     * 添加章节
     * @param chapter
     * @return int
     * 返回类型表示数据库表中受影响的行数,<1则修改失败
     */
    int saveChapter(Chapter chapter);
}
